﻿#include <iostream>
#include <string>
#include <vector>
#include <algorithm>


using namespace std;



string mul(string x, string y) {
    if (x == "0" || y == "0") return "0";
    int m = x.size(), n = y.size();
    reverse(x.begin(), x.end());
    reverse(y.begin(), y.end());

    // 1.实现乘法，并累加 
    vector<int> ans(m + n);
    for (int i = 0; i < m; ++i)
        for (int j = 0; j < n; ++j)
            ans[i + j] += (x[i] - '0') * (y[j] - '0');

    // 2.使用加法算出最终结果
    int carry = 0;
    for (int i = 0; i < m + n; ++i) {
        ans[i] += carry;
        carry = ans[i] / 10;
        ans[i] %= 10;
    }

    // 3.得出最终位数
    int fin = m + n;
    for (int i = m + n - 1; i >= 0; --i) {
        if (ans[i] != 0) {
            fin = i;
            break;
        }
    }

    // 4.返回结果
    string ret;
    for (int i = fin; i >= 0; --i)
        ret += (ans[i] + '0');
    return ret;
}

string fast_pow(int n) {
    if (n == 0) return "1";
    string a = "2", res = "1";
    while (n > 0) {
        if ((n & 1) == 1) {
            res = mul(res, a);
        }
        a = mul(a, a);
        n >>= 1;
    }
    return res;
}


string add(string x, string y) {
    reverse(x.begin(), x.end());
    reverse(y.begin(), y.end());
    int m = x.size(), n = y.size();
    vector<int>ans(max(m, n) + 1);
    int carry = 0;
    for (int i = 0; i < max(m, n) + 1; ++i) {
        if (i < m)
            ans[i] += x[i] - '0';
        if (i < n)
            ans[i] += y[i] - '0';
        ans[i] += carry;
        carry = ans[i] / 10;
        ans[i] %= 10;
        if ((i >= m &&  i >= n) && carry == 0)
            break;
    }
    int fin = max(m, n);
    if (ans[max(m, n)] == 0)
        --fin;
    string ret;
    for (int i = fin; i >= 0; i--) {
        ret += (ans[i] + '0');
    }
    return ret;
}


int main() {
    int n;
    string d;
    cin >> n >> d;
    string integer, decimals;
    bool flag = false;
    for (auto& x : d) {
        if (x == '.')
            flag = true;
        else if (!flag)
            integer += x;
        else
            decimals += x;
    }
    int s = decimals.size();
    string a = fast_pow(n);
    integer = mul(integer, a);
    decimals = mul(decimals, a);
    int x = decimals.size();
    if (x == s && decimals[x - s] >= '5')
        integer = add(integer, "1");
    else if (x != s && decimals[x - s] >= '5')
        integer = add(integer, add(decimals.substr(0, x - s), "1"));
    else if (x != s)
        integer = add(integer, decimals.substr(0, x - s));
    cout << integer;
}